import request from '@/utils/request.js'

// 获取列表
export const getarticleListApi = (url,params)=>{
    return request({
        url:url,
        method:'get',
        params
    })
}

// 获取详情
export const getarticleInfoApi = (id)=>{
    return request({
        url:'/content/article/'+id,
        method:'get',
    })
}

// 新增数据
export const addarticleApi = (data)=>{
    return request({
        url:'/content/article',
        method:'post',
        data
    })
}

// 修改数据
export const editarticleApi = (data)=>{
    return request({
        url:'/content/article/'+data.id,
        method:'put',
        data
    })
}

// 删除
export const delarticleApi = (id)=>{
    return request({
        url:'/content/article/'+id,
        method:'delete'
    })
}

//获取小区列表
export const getcommunityApi = (data)=>{
    return request({
        url:'/community',
        method:'get',
    })
}